#include <bits/stdc++.h>

using namespace std;

int f[5010][5010],n,la=1,lb=1,lc=1;
int main(){
    cin>>n;
    f[1][0] =1;
    f[2][0] =2;
    for(int i=3;i<=n;i++){
        for(int j=0;j<lc;j++){
           f[i][j] += f[i-1][j]+f[i-2][j];
           f[i][j+1] += f[i][j]/10;
           f[i][j] = f[i][j]%10;
        }
        if(f[i][lc]>0)lc++;
      //  f[i] = f[i-1]+f[i-2];
    }
    for(int i=lc-1;i>=0;i--){
       cout<<f[n][i];
    }
    return 0;
}
